package cn.kgc.userconsumer.client;

import cn.kgc.userconsumer.fallback.UserFeignClientFallBack;
import cn.kgc.userconsumer.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "user-provider",fallback = UserFeignClientFallBack.class)
public interface UserFeignClient {


    @RequestMapping(value= "/user/login",method = RequestMethod.POST)
    public User login(@RequestParam String username,@RequestParam String pwd);



    @RequestMapping(value = "/user/login2",method = RequestMethod.POST)
    public User login2(@RequestBody User user1);


    @RequestMapping(value = "/user/userinfo",method = RequestMethod.POST)
    public void userinfo(@RequestParam  int count);
}
